layui.use(['dtree','xmSelect'], function(){
	
	var element = layui.element;
	var form = layui.form;
	var dtree = layui.dtree;
	var xmSelect = layui.xmSelect;
	
	$("#userDetailSex").initSelectDict();
	$("#userDetailStatus").initSelectDict();
	
	var model = $(".model").text();
	var roleList = JSON.parse(model).roleList;
	var roleData = [];
	for(key in roleList){
		var data = {};
		data.name = roleList[key].roleName;
		data.value = roleList[key].roleId;
		data.selected = true;
		roleData.push(data);
	}
	var role = xmSelect.render({
		el: '#role',
		language: 'zn',
		disabled: true,
		autoRow: true,
		data: roleData
	})
	
	var deptList = JSON.parse(model).deptList;
	var deptData = [];
	for(key in deptList){
		var data = {};
		data.name = deptList[key].deptName;
		data.value = deptList[key].deptId;
		data.selected = true;
		deptData.push(data);
	}
	var dept = xmSelect.render({
		el: '#dept',
		language: 'zn',
		disabled: true,
		autoRow: true,
		data: deptData
	})
	
	initFormData();
		
})